package cn.net.ecode.modules.sys.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.net.ecode.common.config.Global;
import cn.net.ecode.common.utils.CacheUtils;
import cn.net.ecode.common.web.BaseController;

@Controller
@RequestMapping(value = "${adminPath}/sys/cache")
public class CacheController extends BaseController {

	/***
	 * 登陆用户权限
	 * @param entity
	 * @param model
	 * @return
	 */
	@RequestMapping(value = "clear")
	@ResponseBody
	public String clear() {
		CacheUtils.clearPlatform();
		CacheUtils.clearProject();
		return renderResult(Global.TRUE, "清理缓存成功！");
	}

}
